package core;


import static org.junit.Assert.*;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

public class BarcodeTests {

	@Test
	public void blankBarcodeTest() 
	{
		String bCode = "";
		boolean thrown = false;
		try{
			Barcode barCode = new Barcode(bCode);
		}
		catch(IllegalArgumentException e)
		{
			thrown = true;
		}
		assertTrue(thrown);
		
		thrown = false;
		Barcode barCode = new Barcode("123456789999");
		try{
			barCode.setBarCode("");
		}
		catch(IllegalArgumentException e)
		{
			thrown = true;
		}
		assertTrue(thrown);
	}
	
	

}
